cmake_minimum_required(VERSION 3.4.1)

include_directories("${CMAKE_SOURCE_DIR}/egl")
add_library(egl SHARED egl/egl_color.cpp)
target_link_libraries(egl GLESv3 EGL log)

include_directories("${CMAKE_SOURCE_DIR}/gles")
include_directories("${CMAKE_SOURCE_DIR}/andx")
add_library(gles SHARED
        gles/gles_utility.cpp
        andx/android_utility.cpp)
target_link_libraries(gles GLESv3 log android jnigraphics)

include_directories("${CMAKE_SOURCE_DIR}/sample")
include_directories("${CMAKE_SOURCE_DIR}/game")
add_library(gles-sample SHARED
        sample/sample_triangle.cpp
        sample/sample_vao.cpp
        sample/sample_vbo.cpp
        game/game.cpp)
target_link_libraries(gles-sample gles)